package proxy;

/**
 * @author yunfei.shang
 * @date 2018/03/26
 * @descreption 创建实现接口的被代理实体类
 */
public class RealImage implements IImage {
    private String fileName;

    public RealImage(String fileName) {
        this.fileName = fileName;
        loadImage(fileName);
    }

    @Override
    public void display() {
        System.out.println("Displaying " + fileName);
    }

    public void loadImage(String fileName) {
        System.out.println("Loading " + fileName);
    }
}
